package com.ftg.learn.demo;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author kangjx
 * @createTime 2022/8/12
 */
public class Example {

    public static void main(String[] args) {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("application.xml","","");
        Elephant el1 = (Elephant) applicationContext.getBean("elephant");
        System.out.println(el1.getPe().getName());
        el1.getIwork().dazhan();
    }

}
